home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Info-Mac 4
/
Info_Mac IV CD-ROM (Pacific HiTech Inc.)(August 1994).iso
/
Development
/
Information
/
alt-sources-mac-digest-94-02.tx
< prev
next >
Wrap
Internet Message Format
|
1994-06-09
|
21KB
From: dnebing@andy.bgsu.edu (Dave Nebinger)
Subject: Alt.sources.mac Digest #02-94
Date: Wed, 26 Jan 1994 19:47:35 GMT
alt.sources.mac digest #2-94 1/26/94
Today's Contents:
[!] administrivia
[*] antialiasedtext.cpt.hqx
[*] asyncsysbeep.cpt.hqx
[*] blazingpixels.cpt.hqx
[*] logfile.cpt.hqx
[*] newshuttle.cpt.hqx
[*] patchlib.cpt.hqx
[*] popupcdef-1.0b1.cpt.hqx
[*] speedy-mouse-ii.cpt.hqx
[*] spline.cpt.hqx
[*] toxicwaste.cpt.hqx
[*] wintershell-10d2.cpt.hqx
[#] balloonhelp
[#] bandpass
[#] copystr255
[#] dbllinklist-c
[#] digitalaudio
[#] drawgoawaybox
[#] editinmodeless
[#] flipnums
[#] getwindowrect
[#] gmtime
[#] growicononly
[#] growzone
[#] listdir
[#] listspclkeys-c
[#] listspclkeys-p
[#] lzcompression
[#] menudraw
[#] modelessdragger
[#] mousemoved
[#] quitallapps
[#] readlocation
[#] setdialoghdrs
[#] videosync
[#] whendrawbw
[#] xprammap
[!] Who's Who List
The alt.sources.mac archive is at ftpbio.bgsu.edu
(129.1.252.66) in the /ftp/pub/alt.sources.mac directory.
Files listed with an [*] before them are in the main
directory. Files listed with an [#] in front of them
are in the /ftp/pub/alt.sources.mac/00snippet directory.
Scripts are stored in the /ftp/pub/alt.sources.mac/scripts
directory.
Also stored at the archive site are the FAQs for the
Mac newsgroups in the /ftp/pub directory. Postings to
comp.sources.mac are archived in the /ftp/pub/comp.sources.mac
directory. The alt.sources.mac digests are archived in the
/ftp/pub/digests directory.
The alt.sources.mac newsgroup is for the distribution of
sources only.
************************************************************
From: dnebing@andy.bgsu.edu (Dave Nebinger)
Subject: Administrivia
Welcome to the alt.sources.mac digest. Currently, I am
the moderator of the archive. I thought I would post this
message to show everyone what has been accumulating at the
archive site.
Your contributions are highly recommended and accepted.
If you don't have access to the alt.sources.mac newsgroup,
you can email your contribution to me (dnebing@andy.bgsu.edu)
and I will add it to the archive, or you can upload it to
the /ftp/pub/incoming directory at the archive site.
I would also recommend to those programmers posting
snippets to the comp.sys.mac.* heirarchy to also crosspost
them to the alt.sources.mac group so that I can make sure
that it gets added to the archive.
A new addition to the digest is the Who's Who list found at
the end of the digest. It contains the list of contributors for
the digest. It will give you, at a glance, an idea about who
is supporting the alt.sources.mac group.
There has been somewhat of a dispute about the fact that I
have stored the undocumented Layer Manager stuff at the
archive. Apple's postition is that it is for their internal
use only, and if anyone else uses it their package is guaranteed
to break in the future. Others disagree with this point of
view and would like the information available. So I am going
to keep it in the archive, but I have added a strict warning to
the snippet about this.
There are also some new documents at ftpbio.bgsu.edu in
the /ftp/pub directory. Here you will find the FAQ's for most
of the mac programming groups, as well as the ones for
alt.sources.mac. Also there is a document describing the
submission policy for the archive which includes directions
for posting to alt.sources.mac. If anything is missing that
you feel should be there, either email it to me or upload it
to ftpbio.bgsu.edu in /ftp/pub/incoming.
Thanks for you support, and if you have any questions,
problems, or maladjustments, feel free to email me. Also, let
me know if you have any problems accessing the archive. One
user has already alerted me to an access problem that they were
having. The only way I can fix things is if I am told...
Dave Nebinger (dnebing@andy.bgsu.edu)
************************************************************
From: Ed Wynne <arwyn@engin.umich.edu>
Subject: Anti-Aliased Text
Included is a binhex 4.0 stuffit archive of Think C source
code and a library to draw anti-aliased text with a small
demo app. I wrote it in the space of an afternoon so it isn't
extremely robust, or probably even bug-free. Itseems to work
very well on a Centris650 and a IIsi...although, its a little
slower on the IIsi!
Currently this code has one function that mimics DrawString
in every way, except it will only work with black text on a
white background. At some point I plan on adding forecolor
and backcolor support and I'll repost it then if theirs any
interest.
If anybody uses this code (its free...no restrictions
what-so-ever!) all I ask is that you tell me of any bugs you
find (so I can fix them!) or you send me a copy of your fixes.
[archived as /ftp/pub/alt.sources.mac/antialiasedtext.cpt.hqx]
============================================================
From: Ed Wynne <arwyn@engin.umich.edu>
Subject: INIT source for asyncronous SysBeep
Enclosed is the source (Think C 6.0) and the compiled init that
will make the System Beep totally asyncronous. This init only
takes about 650 bytes of system heap space and doesn't keep
snd's loaded or sound channels continuously allocated.
It might have some compatibility problems on older macs (I don't
do all of the hw config checks that apple does to get the SysBeep
ID from PRAM) but it works OK on a Centris 650. If you find a
bug, or a problem with it let me know and I'll fix it. Or if you
find a bug and decide to fix it yourself, if it isn't too much
trouble please pass this info back onto me. (I'm running it too!)
[archived as /ftp/pub/alt.sources.mac/asyncsysbeep.cpt.hqx]
============================================================
From: kenlong@netcom.com (Ken Long)
Subject: BlazingPixels (descr)
Blazing Pixels is a little bit map sprite demo, written by Jay Riley,
former moderator of the BMUG Programmer's Conference. On launch, it
implements one routine: main ().
What it does in put up a window, fill it with gray, and move the System
'ICN#' (ID 3) around according to mouse location. The unique thing (I
though, and what do I know?) is that it uses the absolute minimum code to
do this. Also has a VBL synch block of code.
I split this main () routine up into 16 subroutines in a modified
version, included, that uses a resource for the 'ICN#' ID 128, for the
fun of it. The icon is my mug.
[archived as /ftp/pub/alt.sources.mac/blazingpixels.cpt.hqx]
============================================================
From: dnebing@andy.bgsu.edu (Dave Nebinger)
Subject: Log file routines
Here's a nice little, tiny, documented chunk of code for handling
the creation and use of log files in your project. It works great
for those hard to debug items like bg-apps, inits, etc.
Written in Think C 6.01, requires use of FindFolder and the
(at least) ansi-small library.
[archived as /ftp/pub/alt.sources.mac/logfile.cpt.hqx]
============================================================
From: kenlong@netcom.com (Ken Long)
Subject: NewShuttle 1.0d3 description
NewShuttle is a C port (from Pascal) I did of "Eddy's Shuttle Viewer" - a
point plotter that draws a wire frame space shuttle with 129 "MoveTo and
LineTo" calls, according to specified and calculated (on the fly) values.
Then the whole thing is erased and a new, rotated-slightly view is drawn.
This goes on until mouseDown at the end of a cycle. (press and hold down.)
NewShuttle 1.0d3 is a further tweak of that same C port (posted on SUMEX
in "three-point-plotters-c"). This one draws in the whole 512x384
window, after hiding the menu bar. I also have a duplicate draw routine,
that runs first, which takes the calculated MoveTo/LineTo coordinates,
"nums them to strings," then lists those in 7 columns on the screen.
THEN it draws the shuttle over them (in yellow if you have color).
Future fiddling will output the point coord's to a text file (just for
the fun of it) and user options to draw them or not. Also a
screenBits.bounds calc. into the value math to do the full screen draw in
proportion on any monitor (I hate the 12" RGB anyway). Looks funky with
a 512x384 plain window in the upper left of a 21" RGB with the menu bar
gone! And a little, dinky line drawing in it!
In the meantime, here's this. Just a toy, but it's C source!
[archived as /ftp/pub/alt.sources.mac/newshuttle.cpt.hqx]
============================================================
From: ari@world.std.com (Ari I Halberstadt)
Subject: Re: [Q] How does one patch the trap _FrontWindow?
Following is some THINK C assembly glue which I use in all my trap
patches. It uses some assembly language tricks, but I've used it to
successfully patch HiliteWindow, ExitToShell, and LoadSeg. It allows
the patch routine to skip execution of the original routine and to
return a value as the value of the patch. Actually, the skip flag has
been tested, but the BlockMove instruction for copying the return
result hasn't been tested since I just haven't had occasion to patch a
routine that returns a value. The patch glue allows only head patches.
You could easily modify the glue to work from an INIT by changing the
call to NewPtrClear to NewPtrSysClear, though the merits of creating
pointers in the system heap are debatable. Perhaps you could make it a
relocatable block with the first few instructions after saving the
registers being a call to HGetState/HLock, and just before the last
instruction call HSetState (use HSetState, not HUnlock, so your code
is reentrant).
[archived as /ftp/pub/alt.sources.mac/patchlib.cpt.hqx]
============================================================
From: ari@world.std.com (Ari I Halberstadt)
Subject: Type-in Popup CDEF
This popup CDEF is compatible with systems 6.0 and 7.0 and is similar
to the standard popup CDEF supplied with system 7.0 and described in
IM-VI. An additional variation code, popupTypeIn, helps support
type-in popup menus by displaying only the down arrow without the
current selection or title. The application still needs to support
the editable text field for the type-in popup menu. Except for the
popupTypeIn attribute this CDEF should be upwards compatible with
the system 7.0 CDEF. The MDEF is used to draw the current selection,
so that even icons in menus are properly displayed. The only major
feature missing is color support, but this should not be difficult
for someone to add. Full C source for THINK C 5.0.4 is included.
This software is freeware and may be included in the info-mac
commercial CD-ROM. For all other commercial distribution please
contact the author.
[archived as /ftp/pub/alt.sources.mac/popupcdef-1.0b1.cpt.hqx]
============================================================
From: f8dy@access.netaxs.com (Mark Pilgrim)
Subject: Speedy Mouse ][ (INIT, THINK C) 0 of 1
Language: THINK C (5/6)
Type: INIT
Speedy Mouse ][ will make your mouse move about twice as fast as normal,
unless the caps lock is down, in which case it will be back to normal
speed.
After many users complaining that Speedy Mouse didn't work on their system,
or it did work but conflicted with several other software packages, I have
completely reworked this to come up with a sequel which, like all sequels,
solves all the problems of the original but probably creates new problems
in the process.
This INIT installs a vbl (a relatively easy task) and initializes a memory
space before the vbl pointer so that the vbl itself can access it (a
relatively easy task if you know what you're doing, which I didn't when I
started). The vbl itself finds the current 'mcky' resource in the system
heap (quite a difficult task) and mucks with it, and monitors the low-mem
copy of parameter RAM to notice when the mouse scaling setting has been
changed (an easy but undocumented task) and re-mucks with the 'mcky' data.
The upshot of it is that this INIT never touches the low-memory globals
that
control the actual mouse position, so it shouldn't conflict with any other
software that does (like Snap-To, Quickeys, and voice navigation software).
OTOH, it may have some new problems that I'm not aware of. In any event,
I heartily don't recommend any of the methods I use in here; to quote an
Apple guru on csmp, "We've reserved a special place in hell for you for
even
THINKING about using any of this information."
[archived as /ftp/pub/alt.sources.mac/speedy-mouse-ii.cpt.hqx]
============================================================
From: foster@gaul.csd.uwo.ca (COLIN FOSTER)
Subject: Spline Project 0/2
Contained in the archive are source files, Think C project,
and program for a Graphics program using Splines, prepared by
Reid Ellis. It's not exactly what was requested, but it
might be useful.
-Colin Foster.
Colin_Foster@magic-bbs.corp.apple.com
[archived as /ftp/pub/alt.sources.mac/spline.cpt.hqx]
============================================================
From: David_K._Peck@digntn1.csgi.com
Subject: Network Message CODE
Since so many people requested it, here is a copy of Toxic Waste, my
network
practical joke program. It also contains a copy of the code, which should
be a
very good example of how to send data over a Macintosh network. I hope you
enjoy
it!
I am a bit worried that the file is too big to send from the machine I am
using; in that case, it will cut it off... and it won't work. Please tell
me
if it doesn't and I'll send it in smaller segments. The file name is
TW.CPT,
and it is 51k in size.
Send any questions, comments, or bugs to:
David Peck
PeckSoftware@his.com
[archived as /ftp/pub/alt.sources.mac/toxicwaste.cpt.hqx]
============================================================
From: ari@world.std.com (Ari I Halberstadt)
Subject: winter-shell-10d2-c.cpt.hqx, part 01/20
Source code for a Macintosh application shell. Approximately 1.1
megabytes of C source code are provided (at 27 characters per line,
that's over 40000 lines). Both systems 6 and 7 are supported. You may
use this as the basis for an application, or you may extract any
useful functions you find for use in your own code. There are many
useful code snippets in here, and the code should prove useful for
both beginner and experienced Macintosh programmers. The code was
written with THINK C 5.0.4, though porting to MPW should not be too
difficult; guidelines for porting are included in the file "Porting".
The software is free, and may be used in any free product according to
the terms described in the file "Distribution". For commercial use
please contact the author.
This is the first public release. Documentation is sparse; if there is
interest and as time permits I may write additional documentation.
[archived as /ftp/pub/alt.sources.mac/wintershell-10d2.cpt.hqx]
************************************************************
balloonhelp Perl and Rez scripts for doing Balloon Help
Peter Lewis (peter@ncrpda.curtin.edu.au)
Perl and Rez scripts for creating balloon help.
bandpass Band-pass filter
Rick Walker (walker@opus.hpl.hp.com)
C source for a band-pass filter [converts sounds between
frequencies]
copystr255 Copying a Str255
Keith Rollin (keith@taligent.com)
Demonstrating a quick way in C to copy a Str255 variable.
dbllinklist-c Doubly Linked List Code in C
Mike Russel (mgr@aggroup.aggroup.com)
C code that implements a doubly linked list.
digitalaudio Reading digital audio with a CD300
Theo Vosse (vosse@ruls41.leidenuniv.nl)
C routines to read sound tracks from a CD300 and play em.
drawgoawaybox Routine for drawing the go away box
Carl R. Osterwald (carl_osterwald@nrel.gov)
C function for drawing a go away box.
editinmodeless Implementing edit functions in a modeless dlg
Andrew McClure (andrew@cs.uwa.oz.au)
C function for implementing the standard edit functions in a
modeless dialog.
flipnums Flip between little and big endians
Ron Hunsinger (ron_hunsinger@bmug.org)
C functions to flip the byte orders of shorts and longs.
getwindowrect Getting a window's rectangle
Robert Mah (rmah@panix.com)
C function to get a window's rectangle. This rect can then
be saved and used to reposition and resize a window.
gmtime Getting the time zone of the mac.
Richard Knuckey (richard@purplex.nacjack.gen.nz)
C routine to implement gmtime (of un*x fame) on the mac.
growicononly Drawing the Grow Icon without the empty scroll bars
Frank Manshade (frankm@and.nl)
C function for drawing the grow icon for a window without also
drawing the empty scroll bars.
growzone Growing the app's zone
Peter Lewis (peter@ncrpda.curtin.edu.au)
Pascal routines for modifying the size of the application's
zone.
listdir List a volume or directory textually
Jon Wtte (d88-jwa@hemul.nada.kth.se)
C routines to list the contents of a volume/directory.
[Sorry for not being able to get your name right, Jon - Dave]
listspclkeys-c Implementing special keys with a list
Peter Kocourek (qsi@nu91.wlink.nl)
C routines to implement the use of special keys (i.e. page
up and down) with a list.
listspclkeys-p Implementing special keys with a list
Peter Lewis (peter@ncrpda.curtin.edu.au)
Pascal routines to implement the use of special keys (i.e. page
up and down) with a list.
lzcompression lz compression source
Derek Kwan (dkwan@zeus.uwaterloo.ca)
C routines to implement lzss, lz-huffman, and lz-ari code.
menudraw Drawing on the right side of the menu
Keith Rollin (keith@taligent.com)
C routines for drawing the time on the right side of the menu.
modelessdragger FilterProc for SFPGetFile
Andrew McClure (andrew@cs.uwa.oz.au)
C FilterProc routine for SFPGetFile that allows dragging
of windows behind the SFPGetFile window.
mousemoved Getting the location of the mouse pointer
Ken Long (kenlong@netcom.com)
C routine to get the location of the mouse and convert it to
a string which can be printed.
quitallapps How to quit all apps...
Andrew Francke (afrancke@netcom.com)
C functions showing how to restart a mac after a given time
period has elapsed.
readlocation ReadLocation details
Pete Resnick (resnick@cogsci.uiuc.edu)
Undocumented details for using ReadLocation.
setdialoghdrs C glue for SetDialogXxx routines
Benjamin Herrenschmidt (benh@tatooine.fdn.org)
C glue for the GetStdFilterProc, SetDialogDefaultItem,
SetDialogCancelItem, SetDialogTracksCursor, and
StdFilterProc.
videosync Routines for synchronized drawing
Timothy Hunt (hunt@husc7.harvard.edu)
C routines for synchronized VBLTask drawing.
whendrawbw When to draw in color vs. b&w
Carl R. Osterwald (carl_osterwald@nrel.gov)
Algorithm for deciding when to draw in color vs. b&w.
xprammap Map of the extended pram
Kiselyov Oleg (oleg@ponder.csci.unt.edu)
A detailed map of the contents of the XPRAM.
************************************************************
Who's Who in Digest #2...
The contributors to this digest are:
Colin Foster (foster@gaul.csd.uwo.ca)
Andrew Francke (afrancke@netcom.com)
Ari I Halberstadt (ari@world.std.com)
Benjamin Herrenschmidt (benh@tatooine.fdn.org)
Ron Hunsinger (ron_hunsinger@bmug.org)
Timothy Hunt (hunt@husc7.harvard.edu)
Richard Knuckey (richard@purplex.nacjack.gen.nz)
Peter Kocourek (qsi@nu91.wlink.nl)
Derek Kwan (dkwan@zeus.uwaterloo.ca)
Peter Lewis (peter@ncrpda.curtin.edu.au)
Ken Long (kenlong@netcom.com)
Robert Mah (rmah@panix.com)
Frank Manshade (frankm@and.nl)
Andrew McClure (andrew@cs.uwa.oz.au)
Dave Nebinger (dnebing@andy.bgsu.edu)
Kiselyov Oleg (oleg@ponder.csci.unt.edu)
Carl R. Osterwald (carl_osterwald@nrel.gov)
David Peck (David_K._Peck@digntn1.csgi.com)
Mark Pilgrim (f8dy@access.netaxs.com)
Pete Resnick (resnick@cogsci.uiuc.edu)
Keith Rollin (keith@taligent.com)
Mike Russel (mgr@aggroup.aggroup.com)
Theo Vosse (vosse@ruls41.leidenuniv.nl)
Rick Walker (walker@opus.hpl.hp.com)
Jon Wtte (d88-jwa@hemul.nada.kth.se)
Ed Wynne (arwyn@engin.umich.edu)
============================================================
Dave Nebinger dnebing@andy.bgsu.edu
Network Manager, Biology Dept. dnebing@opie.bgsu.edu
Bowling Green State University dnebing@bgsuopie (bitnet)
Bowling Green, OH 43403 #include <std_disclaimer.h>
*THE* alt.sources.mac supporter!